package com.perceptivesoftware.licensing.domain.generated;

import java.util.List;
import java.util.ArrayList;
import javax.persistence.GenerationType;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * TwRolepriv entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TW_ROLEPRIV")
public class TwRolepriv implements java.io.Serializable
{

	// Fields    

	private TwRoleprivId id;

	private TwRoleval twRoleval;

	// Constructors

	/** default constructor */
	public TwRolepriv()
	{
		// empty constructor required for Spring
	}

	// Property accessors

	@EmbeddedId
	@AttributeOverrides(
	{ @AttributeOverride(name = "roleprivRoleCode", column = @Column(name = "ROLEPRIV_ROLE_CODE", nullable = false, length = 38)), @AttributeOverride(name = "roleprivPrivType", column = @Column(name = "ROLEPRIV_PRIV_TYPE", nullable = false, scale = 0)), @AttributeOverride(name = "roleprivPrivAction", column = @Column(name = "ROLEPRIV_PRIV_ACTION", nullable = false, scale = 0)), @AttributeOverride(name = "roleprivItemCode", column = @Column(name = "ROLEPRIV_ITEM_CODE", nullable = false, length = 38)) })
	public TwRoleprivId getId()
	{
		return this.id;
	}

	public void setId(TwRoleprivId id)
	{
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ROLEPRIV_ROLE_CODE", nullable = false, insertable = false, updatable = false)
	public TwRoleval getTwRoleval()
	{
		return this.twRoleval;
	}

	public void setTwRoleval(TwRoleval twRoleval)
	{
		this.twRoleval = twRoleval;
	}

}